<?php
	global $wpdb;
	$site_name = get_bloginfo('name');
	$site_url = get_bloginfo('home');
	
	##default
	$banner  = get_bloginfo('template_url')."/images/banner.png";	
	require_once TEMPLATEPATH.'/controllers/banner/isset-page.php';
	
	$args=array(
	  'name' => $banner_for,
	  'post_type' => 'banner',
	  'post_status' => 'publish',
	  'showposts' => 1,
	  'caller_get_posts'=> 1
	);
	$my_posts = get_posts($args);	
	$thumbnail = db_get_post_meta($my_posts[0]->ID, $wpdb->prefix.'thumbnail');
	$url	= get_post_meta($my_posts[0]->ID, $wpdb->prefix.'url',true);
	if($thumbnail) 
		$banner = $thumbnail;
	require_once TEMPLATEPATH.'/views/banner/view-banner.php';	
	wp_reset_query();		
?>
		
